package groovy.com.wz.test;

public class UserService {

    public boolean isLogin(User user){
        return user.getSessionId()!=null;
    }

    public User getUserByUserId(String userId){
        if (userId.equals("100")){
            return new User("100","wang", 1, "1111");
        } else if (userId.equals("200")){
            return new User("200","wang", 1, "1111");
        } else{
            return null;
        }
    }
}